package com.yds.ydsdatasetbackend.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yds.ydsdatasetbackend.model.dto.file.FileEditRequest;
import com.yds.ydsdatasetbackend.model.dto.file.FileQueryRequest;
import com.yds.ydsdatasetbackend.model.dto.file.FileUploadRequest;
import com.yds.ydsdatasetbackend.model.dto.file.train.FileTrainAddRequest;
import com.yds.ydsdatasetbackend.model.dto.file.train.FileTrainEditRequest;
import com.yds.ydsdatasetbackend.model.dto.file.train.FileTrainQueryRequest;
import com.yds.ydsdatasetbackend.model.entity.File;
import com.yds.ydsdatasetbackend.model.entity.FileTrain;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yds.ydsdatasetbackend.model.entity.User;
import com.yds.ydsdatasetbackend.model.vo.FileTrainVO;
import com.yds.ydsdatasetbackend.model.vo.FileVO;

import javax.servlet.http.HttpServletRequest;

/**
* @author YDS
* @description 针对表【file_train(文件训练)】的数据库操作Service
* @createDate 2025-02-05 14:56:52
*/
public interface FileTrainService extends IService<FileTrain> {

    /**
     * 添加文件训练数据
     * @param fileTrainAddRequest
     * @return
     */
    FileTrainVO addFileTrain(FileTrainAddRequest fileTrainAddRequest, User loginUser);

    /**
     *
     * @param fileTrainEditRequest
     * @param loginUser
     */
    void editFile(FileTrainEditRequest fileTrainEditRequest, User loginUser);

    void checkFileTrainAuth(User loginUser, FileTrain fileTrain);

    FileTrainVO getFileTrainVO(FileTrain fileTrain, HttpServletRequest request);

    Page<FileTrainVO> getFileTrainVOPage(Page<FileTrain> fileTrainPage, HttpServletRequest request);

    QueryWrapper<FileTrain> getQueryWrapper(FileTrainQueryRequest fileTrainQueryRequest);

    void deleteFileTrain(long fileTrainId, User loginUser);
}
